//package com.lczyfz.campusinfo.modules.campusinfoorder.service;
//
//import java.text.SimpleDateFormat;
//import java.util.Date;
//
//import com.lczyfz.campusinfo.modules.campusinfoorder.entity.CampusinfoOrder;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//import com.lczyfz.campusinfo.common.utils.EnumSeq;
//
//@Service
//public class SequenceGenerationServiceImpl {
//    @Autowired
//    private CampusinfoOrderService campusinfoOrderService;
//    public String getSquenceNo(EnumSeq seqName) {
//    	/**
//    	 * 从数据库取到唯一的编号
//    	 */
//        CampusinfoOrder campusinfoOrder = new CampusinfoOrder();
//        campusinfoOrder.setSeqTag("TQ");
//        //campusinfoOrderService.save(campusinfoOrder);
//        CampusinfoOrder findcampusinfoOrder =  campusinfoOrderService.getmax(campusinfoOrder);
//
//        /**
//         * 日期变了，需要重置下序列
//         */
//    	SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHH");
//        return String.format("%s%s%08d", seqName.getPrefix(), sdf.format(new Date()),  findcampusinfoOrder.getId());
//    }
//}
